/*
 * @Author: adolphus adolphus520@163.com
 * @Date: 2022-12-11 22:29:08
 * @LastEditors: 姚杰鸿
 * @LastEditTime: 2025-01-23 16:23:09
 * @Description: file content
 */
import req from "@/lib/axios";

export const IntfApi = (info: string, attr: boolean) =>
  req({
    url: `/interface${info}`,
    method: "get",
    headers: {
      "q-attr-info": attr ? "1" : "",
    },
  });

export const GetIntfApi = (code: string) =>
  req({
    url: `/interface/${code}`,
    method: "get",
  });

export const IsValidIntfCodeApi = (id: number, code: string) =>
  req({
    url: `/interface/valid/${id}/${code}`,
    method: "get",
  });

export const IntfPostApi = (role: any) =>
  req({ url: "/interface", method: "post", data: role });

export const IntfDeleteApi = (role: any) =>
  req({ url: `/interface/${role.code}`, method: "delete" });
